// Name：P3_2.c
// Purpose：对用户录入的产品信息进行格式化
// Author：wjy
// From：《C语言程序设计：现代方法》（第二版）第三章第2题
// Date：2021.12.30

#include <stdlib.h> 
#include <stdio.h>

int main(void)
{
    int number;
    float price;
    int day;
    int month;
    int year;
    printf ("Enter item number: ");
    scanf ("%d", &number);
    printf ("Enter unit price: ");
    scanf ("%f", &price);
    printf ("Enter purchase date (mm/dd/yyyy): ");
    scanf ("%d/%d/%d", &month, &day, &year);
    printf ("Item\tUnit\t\tPurchase\n\tPrice\t\tDate\n%d\t$%7.2f\t%d/%d/%d\n", number, price, month, day, year);
    system("pause");
    return 0;
}